package com.example.zsf.presenter;

import com.example.zsf.base.Presenter;
import com.example.zsf.base.ZSFGlobal;
import com.example.zsf.network.Api;
import com.example.zsf.network.RetrofitManager;

import retrofit2.Call;

public class MessagePresenter extends Presenter {
    public static <T> Call<T> getMessage(PresenterListener<T> presenterListener) {
        Api api = RetrofitManager.getInstance()
                .setBaseUrl(ZSFGlobal.baseUrl)
                .build(Api.class);
        Call call = api.getMessage();
        call.enqueue(new SampleCallback(presenterListener));
        return call;
    }
}
